package com.leps.nq.op.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.leps.nq.common.vo.PageVo;
import com.leps.nq.op.entity.OpDeviceMaintenance;
import com.leps.nq.op.mapper.OpDeviceMaintenanceMapper;
import com.leps.nq.op.service.IOpDeviceMaintenanceService;
import com.leps.nq.op.vo.DeviceMaintenanceQueryModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 设备运维(保养)记录表 服务实现类
 * </p>
 *
 * @author hex
 * @since 2022-05-22
 */
@Service
public class OpDeviceMaintenanceServiceImpl extends ServiceImpl<OpDeviceMaintenanceMapper, OpDeviceMaintenance> implements IOpDeviceMaintenanceService {
    @Autowired
    OpDeviceMaintenanceMapper deviceMaintenanceMapper;

    @Override
    public PageVo<OpDeviceMaintenance> pageByQueryModel(DeviceMaintenanceQueryModel queryModel) {
        Page<OpDeviceMaintenance> page = Page.of(queryModel.getPageNum(), queryModel.getPageSize());
        page = this.deviceMaintenanceMapper.selectByQueryModel(page, queryModel);
        return PageVo.of(page);
    }
}
